import configparser
from obcs import ObS3

config = configparser.ConfigParser()
config.read('config.ini', encoding="utf-8")
sections = config.sections()

# print(sections)

S3Config = {
    'Endpoint': config.get('S3','Endpoint'),
    'Region': config.get('S3','Region'),
    'SecretId' : config.get('S3','SecretId'),
    'SecretKey': config.get('S3','SecretKey')
}
bucket = config.get('S3','bucket')
obset = { 
    'daily_dir': config.get('ObsidianSetting','daily_dir'),
    'daily_attachment_dir': config.get('ObsidianSetting','daily_attachment_dir')
}
# public use
obcos = ObS3(S3Config, bucket ,obset)
right_token = config.get('Flask','right_token')
moonreader_token = config.get('Flask','moonreader_token')
simp_read_token = config.get('Flask','simp_read_token')
web_url = config.get('global','web_url')